/*
 * @Description: 
 * @Author: zoe
 * @Date: 2024-09-13 09:25:08
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-13 10:05:31
 */
public class Test02 {
    //main方法
    public static void main(String[] args) {
        //创建对象
        Student s1 = new Student();
        s1.setName("小v");
        s1.sayHello();
        //创建一个孩子类
        A a1 = new A();
        a1.spending();
        a1.fishing();
        a1.drinking();
        a1.setHouse("爸爸的复式");
        a1.setMoney(100);
        System.out.println("a1.getHouse:"+a1.getHouse());
        System.out.println("a1.getMoney:"+a1.getMoney());
        //创建一个父类对象
        B b1 = new B();
        b1.setMoney(100);
        b1.setHouse("复式");
        System.out.println("b1.getHouse:"+b1.getHouse());
        System.out.println("b1.getMoney:"+b1.getMoney());
    }
}
